3.11 \(\int \cosh ^2(a+b x^2) \, dx\)

Optimal. Leaf size=78 \[ \frac {\sqrt {\frac {\pi }{2}} e^{-2 a} \text {erf}\left (\sqrt {2} \sqrt {b} x\right )}{8 \sqrt {b}}+\frac {\sqrt {\frac {\pi }{2}} e^{2 a} \text {erfi}\left (\sqrt {2} \sqrt {b} x\right )}{8 \sqrt {b}}+\frac {x}{2} \]

[Out]

1/2*x+1/16*erf(x*2^(1/2)*b^(1/2))*2^(1/2)*Pi^(1/2)/exp(2*a)/b^(1/2)+1/16*exp(2*a)*erfi(x*2^(1/2)*b^(1/2))*2^(1
/2)*Pi^(1/2)/b^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {5301, 5299, 2204, 2205} \[ \frac {\sqrt {\frac {\pi }{2}} e^{-2 a} \text {Erf}\left (\sqrt {2} \sqrt {b} x\right )}{8 \sqrt {b}}+\frac {\sqrt {\frac {\pi }{2}} e^{2 a} \text {Erfi}\left (\sqrt {2} \sqrt {b} x\right )}{8 \sqrt {b}}+\frac {x}{2} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[a + b*x^2]^2,x]

[Out]

x/2 + (Sqrt[Pi/2]*Erf[Sqrt[2]*Sqrt[b]*x])/(8*Sqrt[b]*E^(2*a)) + (E^(2*a)*Sqrt[Pi/2]*Erfi[Sqrt[2]*Sqrt[b]*x])/(
8*Sqrt[b])

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 5299

Int[Cosh[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Dist[1/2, Int[E^(c + d*x^n), x], x] + Dist[1/2, Int[E^(-c - d*
x^n), x], x] /; FreeQ[{c, d}, x] && IGtQ[n, 1]

Rule 5301

Int[((a_.) + Cosh[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_), x_Symbol] :> Int[ExpandTrigReduce[(a + b*Cosh[c + d*x^
n])^p, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[n, 1] && IGtQ[p, 1]

Rubi steps

\begin {align*} \int \cosh ^2\left (a+b x^2\right ) \, dx &=\int \left (\frac {1}{2}+\frac {1}{2} \cosh \left (2 a+2 b x^2\right )\right ) \, dx\\ &=\frac {x}{2}+\frac {1}{2} \int \cosh \left (2 a+2 b x^2\right ) \, dx\\ &=\frac {x}{2}+\frac {1}{4} \int e^{-2 a-2 b x^2} \, dx+\frac {1}{4} \int e^{2 a+2 b x^2} \, dx\\ &=\frac {x}{2}+\frac {e^{-2 a} \sqrt {\frac {\pi }{2}} \text {erf}\left (\sqrt {2} \sqrt {b} x\right )}{8 \sqrt {b}}+\frac {e^{2 a} \sqrt {\frac {\pi }{2}} \text {erfi}\left (\sqrt {2} \sqrt {b} x\right )}{8 \sqrt {b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 86, normalized size = 1.10 \[ \frac {\sqrt {\pi } (\cosh (2 a)-\sinh (2 a)) \text {erf}\left (\sqrt {2} \sqrt {b} x\right )+\sqrt {\pi } (\sinh (2 a)+\cosh (2 a)) \text {erfi}\left (\sqrt {2} \sqrt {b} x\right )+4 \sqrt {2} \sqrt {b} x}{8 \sqrt {2} \sqrt {b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[a + b*x^2]^2,x]

[Out]

(4*Sqrt[2]*Sqrt[b]*x + Sqrt[Pi]*Erf[Sqrt[2]*Sqrt[b]*x]*(Cosh[2*a] - Sinh[2*a]) + Sqrt[Pi]*Erfi[Sqrt[2]*Sqrt[b]
*x]*(Cosh[2*a] + Sinh[2*a]))/(8*Sqrt[2]*Sqrt[b])

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 73, normalized size = 0.94 \[ -\frac {\sqrt {2} \sqrt {\pi } \sqrt {-b} {\left (\cosh \left (2 \, a\right ) + \sinh \left (2 \, a\right )\right )} \operatorname {erf}\left (\sqrt {2} \sqrt {-b} x\right ) - \sqrt {2} \sqrt {\pi } \sqrt {b} {\left (\cosh \left (2 \, a\right ) - \sinh \left (2 \, a\right )\right )} \operatorname {erf}\left (\sqrt {2} \sqrt {b} x\right ) - 8 \, b x}{16 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x^2+a)^2,x, algorithm="fricas")

[Out]

-1/16*(sqrt(2)*sqrt(pi)*sqrt(-b)*(cosh(2*a) + sinh(2*a))*erf(sqrt(2)*sqrt(-b)*x) - sqrt(2)*sqrt(pi)*sqrt(b)*(c
osh(2*a) - sinh(2*a))*erf(sqrt(2)*sqrt(b)*x) - 8*b*x)/b

________________________________________________________________________________________

giac [A]  time = 0.12, size = 58, normalized size = 0.74 \[ -\frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\sqrt {2} \sqrt {-b} x\right ) e^{\left (2 \, a\right )}}{16 \, \sqrt {-b}} - \frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\sqrt {2} \sqrt {b} x\right ) e^{\left (-2 \, a\right )}}{16 \, \sqrt {b}} + \frac {1}{2} \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x^2+a)^2,x, algorithm="giac")

[Out]

-1/16*sqrt(2)*sqrt(pi)*erf(-sqrt(2)*sqrt(-b)*x)*e^(2*a)/sqrt(-b) - 1/16*sqrt(2)*sqrt(pi)*erf(-sqrt(2)*sqrt(b)*
x)*e^(-2*a)/sqrt(b) + 1/2*x

________________________________________________________________________________________

maple [A]  time = 0.16, size = 51, normalized size = 0.65 \[ \frac {x}{2}+\frac {{\mathrm e}^{-2 a} \sqrt {\pi }\, \sqrt {2}\, \erf \left (x \sqrt {2}\, \sqrt {b}\right )}{16 \sqrt {b}}+\frac {{\mathrm e}^{2 a} \sqrt {\pi }\, \erf \left (\sqrt {-2 b}\, x \right )}{8 \sqrt {-2 b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(b*x^2+a)^2,x)

[Out]

1/2*x+1/16*exp(-2*a)*Pi^(1/2)*2^(1/2)/b^(1/2)*erf(x*2^(1/2)*b^(1/2))+1/8*exp(2*a)*Pi^(1/2)/(-2*b)^(1/2)*erf((-
2*b)^(1/2)*x)

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 56, normalized size = 0.72 \[ \frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} \sqrt {-b} x\right ) e^{\left (2 \, a\right )}}{16 \, \sqrt {-b}} + \frac {\sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\sqrt {2} \sqrt {b} x\right ) e^{\left (-2 \, a\right )}}{16 \, \sqrt {b}} + \frac {1}{2} \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x^2+a)^2,x, algorithm="maxima")

[Out]

1/16*sqrt(2)*sqrt(pi)*erf(sqrt(2)*sqrt(-b)*x)*e^(2*a)/sqrt(-b) + 1/16*sqrt(2)*sqrt(pi)*erf(sqrt(2)*sqrt(b)*x)*
e^(-2*a)/sqrt(b) + 1/2*x

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int {\mathrm {cosh}\left (b\,x^2+a\right )}^2 \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(a + b*x^2)^2,x)

[Out]

int(cosh(a + b*x^2)^2, x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \cosh ^{2}{\left (a + b x^{2} \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x**2+a)**2,x)

[Out]

Integral(cosh(a + b*x**2)**2, x)

________________________________________________________________________________________